
package org.wing.mouseListener;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import org.come.Frame.TestpackJframe;
import org.come.Frame.ZhuFrame;
import org.come.Jpanel.TestpackJapnel;
import org.come.Jpanel.ZhuJpanel;
import org.come.entity.Goodstable;
import org.come.until.GoodsListFromServerUntil;
import org.wing.panel.WingMainPanel;

public class ChooseWingGoodsMouseListener extends MouseAdapter
{

	private WingMainPanel wingMainPanel;

	public ChooseWingGoodsMouseListener(WingMainPanel wingMainPanel)
	{
		this.wingMainPanel = wingMainPanel;
	}

	@Override
    public void mouseEntered(MouseEvent e)
	{
		if (wingMainPanel.getWingGoods() == null) {
            return;
        }
		Goodstable goodstable = GoodsListFromServerUntil.getRgid(wingMainPanel.getWingGoods());
		if (goodstable == null) {
            return;
        }
		if (goodstable != null) {
            ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
        }
	}

	@Override
    public void mouseExited(MouseEvent e)
	{
		TestpackJframe.getTestpackJframe().getJpac().ClearText();
		ZhuFrame.getZhuJpanel().cleargoodtext();
	}
}
